package ch5;

public class Zxf14 {
    public static void main(String[] args) {
        int a = 1000;
        // int b=a%10;
        //int c=(a/10)%10;
        // int d=a/100;
        int e = 0;
        while (a <= 9999) {
            int b = a % 10;
            int c = (a / 10) % 10;
            int d = a / 100 % 10;
            int f = a / 1000;
            if (a == b * b * b * b + c * c * c * c + d * d * d * d + f * f * f * f) {
                e = a;
                System.out.print("水仙数：" + e);
            }
            a++;
        }
    }
}
